home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
tex
/
meta27
/
mfpandor.lzh
/
panaccent.mf
< prev
next >
Wrap
Text File
|
1990-11-16
|
25KB
|
633 lines
%*****************************************************************************
% Copyright (c) 1989 by N. N. Billawala
%*****************************************************************************
% accent.mf miscellaneous accents, ligatures and chars for foreign languages
%19 characters; iff OK "x": for testing
iff OK "x": "The letter i with no dot";
beginchar(oct"020",i_w*width#+a_mono#,xheight#,0);
bot z40=(if singlepitch:.65w else:.5w fi,0); multpos(1,4,40)(stem.lc,0);
lft x4l=round x40l; bot y4=0;
z1=(x4,h)//;
onaline(1l,4l)(2l,3l); y3l=y3r=x_bracket_h;
onaline(1r,4r)(2r,3r); y2l=y2r=max(h-x_bracket_h,y3l);
p1=fullserif(z4,z1,z3l,z3r,.75hs,.75hs)--
terminalserif.l(z1,z4,z2l,z2r,.5ts,x_terminal_angle)--cycle;
if singlepitch:pickup pencircle yscaled thin_stem.lc rotated -oblique;
lft top z12=(0,h); rt top z13=(x1,h);
draw z12--z13; showpoints(12,13);
fi
showpoints(1,2,3,4,40);
adjust(v_a*fitbasis.lc#+m_a*a_mfit#,v_a*fitbasis.lc#+m_a*a_mfit#);
show_character; endchar;
% Exactly the came character as the lowercase "i", but with no dot
iff OK "x": "The letter j with no dot";
beginchar(oct"021",j_w*width#+a_mono#,xheight#,descender#);
top rt z1r=(w,h)//; multpos(1,4)(stem.lc,0);
rt z4r=(w,0);
onaline(1l,4l)(2l,3l); y3l=max(.25xheight,-d+(l_arch*(d+.25xheight)));
onaline(1r,4r)(2r,3r); y3r=max(.25xheight,-d+(r_arch*(d+.25xheight)));
onaline(1,4)(11); y11=y1+max(1,.2h); y2l=y2r=h-x_bracket_h;
lft z6=(0,-.95d)//;
save_num(knob)=min(bulb_thickness,.3*abs(x4l-x6));
bot y5r=top y5l-minor_curve.lc=-d-ov_b.lc;
good_x_for(5r)(z6,z3r,.4)a; good_x_for(5l)(z6+(knob,0),z3l,.4)b;
p1=terminalserif.l(z1,z4,z2l,z2r,.5ts,x_terminal_angle)--z3l{downward} i_t
bulb.bl(z6,z5l,z5r,.5cs,knob,90) o_t z3r{upward}--cycle;
if singlepitch:pickup pencircle yscaled thin_stem.lc rotated -oblique;
lft top z12=(.2w,h); rt top z13=(x1,h);
draw z12--z13; showpoints(12,13);
fi
showpoints(1,2,3,4,5,6,11);
adjust(m_ee*a_mfit#,v_a*fitbasis.lc#+m_e*a_mfit#);
show_character; endchar;
% Exactly the came character as the lowercase "j", but with no dot
iff OK "x": "Grave accent"; %******* .8 ACCENT WIDTH x 1 ACCENT DEPTH
beginchar(oct"022",.8accent_w*width#+b_mono#,
accent_height#+xheight#+accent_depth#,0);
top rt z1=(0,h)//;
bot lft z2=(w,h-max(1,accent_depth))//;
p1=prime_accent(z1,z2,accent_thick_end,accent_thin_end);
showpoints(1,2);
draw (0,xheight)--(w,xheight);
adjust(0+m_a*b_mfit#,0+m_a*b_mfit#);
show_character; endchar;
iff OK "x": "Acute accent"; %******* .8 ACCENT WIDTH x 1 ACCENT DEPTH
beginchar(oct"023",.8accent_w*width#+b_mono#,
accent_height#+xheight#+accent_depth#,0);
top rt z1=(w,h)//;
bot lft z2=(0,h-max(1,accent_depth))//;
p1=prime_accent(z1,z2,accent_thick_end,accent_thin_end);
showpoints(1,2);
draw (0,xheight)--(w,xheight);
adjust(0+m_a*b_mfit#,0+m_a*b_mfit#);
show_character; endchar;
iff OK "x": "Hachek accent"; %******* 1 ACCENT WIDTH x 2/3 ACCENT DEPTH
beginchar(oct"024",accent_w*width#+b_mono#,
accent_height#+xheight#+2/3accent_depth#,0);
save theta,adjustment;
top lft z1=(0,h)//;
bot z2l=bot z22=(.5w,h-max(1,2/3accent_depth))//;
rt z3=(w,y1)//;
pos2(.6[accent_thin_end,accent_thick_end],90);
pos22(min(apex.lc,.5stem.lc),0-apex_angle);
if y2=y1: x1:=x1+eps; fi % keeps from division by 0 error on next line
if bold:theta1=theta3=0; adjustment=1/cosd (angle(z2-z1)+90);
else:theta1=angle(z1-z2)-90;theta3=angle(z3-z2)-90;adjustment=1; fi
pos1(accent_thin_end*adjustment,theta1);
pos3(accent_thin_end*adjustment,theta3);
onaline(1,2)(23); onaline(1l,22l)(21);
onaline(2,3)(21); onaline(22r,3r)(23);
p1=if realsoft_accents: (z2r soften(z1r,z1l) z21{z21-z1l}...
z23{z3r-z23} soften(z3r,z3l) z2r)--cycle;
else: (z2r soften(z1r,z1l,z22l,z22r,z3r,z3l) z2r)--cycle; fi
showpoints(1,2,3,21,22,23);
draw (0,xheight)--(w,xheight);
adjust(0+m_a*b_mfit#,0+m_a*b_mfit#);
show_character; endchar;
% Currently the angle of the accent is based on a varying "accent_depth"
% The thetas are the angles at the ends, flattened for bold chars,
% but theta could be an arbitrary value
iff OK "x": "Breve accent"; %******* 1 ACCENT WIDTH x 2/3 ACCENT DEPTH
beginchar(oct"025",accent_w*width#+b_mono#,
accent_height#+xheight#+accent_depth#,0);
save theta,adjustment;
save_num(thickness)=.5[accent_thin_end,accent_thick_end];
top lft z1l=(0,h)//;
bot z2l=(.5w,h-accent_depth)//;
rt z3r=(w,y1l)//;
pos2(thickness,90);
if y2l=y1l: x1l:=x1l+eps; fi % keeps from division by 0 error on next line
ref1=z1l...z2l{right}; ref2=z3r...z2l{right};
if bold:theta1=theta3=0; adjustment=1/cosd (angle(direction 0 of ref1)+90);
else:adjustment=1;
theta1=angle(direction 0 of ref1)+90;
theta3=angle(direction 0 of ref2)-90;fi
pos1(thickness*adjustment,theta1);
pos3(thickness*adjustment,theta3);
save_pair(end_dir)=if abs(y1l-y2l)>abs(x1l-x2l):upward else:(0,0) fi;
p1=(z2l{right}...z3r{end_dir}
if softpath:)softjoin(z3r--z3l)softjoin( else:-- fi
z3l{-end_dir}...z2r{left}...z1r{end_dir}
if softpath:)softjoin(z1r--z1l)softjoin( else:-- fi
z1l...z2l{right})--cycle;
showpoints(1,2,3);
draw (0,xheight)--(w,xheight);
adjust(0+m_a*b_mfit#,0+m_a*b_mfit#);
show_character; endchar;
% Currently the angle of the accent is based on a varying "accent_depth"
% The thetas are the angles at the ends, flattened for bold chars,
% but theta could be an arbitrary value
iff OK "x": "Macron accent"; %******* 1 ACCENT WIDTH x .5 ACCENT DEPTH
beginchar(oct"026",accent_w*width#+b_mono#,
accent_height#+xheight#+accent_depth#,0);
min_limit(join_radius)(.25[accent_thin_end,accent_thick_end]);
lft z1=(0,h-.5accent_depth)//;
rt z3=(w,y1)//;
multpos(1,3)(.5[accent_thin_end,accent_thick_end],90);
z2l=.5[z1l,z3l];
p1=(z2l soften(z3l,z3r,z1r,z1l) z2l)--cycle;
showpoints(1,2,3);
draw (0,xheight)--(w,xheight);
adjust(0+m_a*b_mfit#,0+m_a*b_mfit#);
show_character; endchar;
iff OK "x": "Circle accent"; %******* 1 ACCENT WIDTH x ACCENT DEPTH
beginchar(oct"027",accent_w*width#+b_mono#,
accent_height#+xheight#+accent_depth#,0);
save thickness;
thickness=min(.3[accent_thin_end,accent_thick_end],.3*accent_depth-1);
z0=(.5w,h-.5*max(2,accent_depth))//;
top z1r=(x0,h); pos1(thickness,90);
bot z3r=(x0,round(h-max(2,accent_depth))); pos3(thickness,-90);
lft z2r=(round(x0-.5(y1r-y3r)),.5[y1r,y3r]); pos2(thickness,180);
rt z4r=(round(x0+.5(y1r-y3r)),y2r); pos4(thickness,0);
p1 =z1r{left} o_t z2r{downward} o_t z3r{right} o_t z4r{upward} o_t cycle;
p1'=z1l{left} i_t z2l{downward} i_t z3l{right} i_t z4l{upward} i_t cycle;
showpoints(1,2,3,4);
draw (0,xheight)--(w,xheight);
adjust(0+m_a*b_mfit#,0+m_a*b_mfit#);
show_character; endchar;
iff OK "x": "Cedilla"; %******* 1 ACCENT WIDTH x .75 ACCENT DEPTH
beginchar(oct"030",accent_w*width#+b_mono#,0,descender#);
bot lft z1l=(.35w,-min(.75accent_depth,d))//;
multpos(1,3)(max(.15accent_depth,accent_thin_end),90-oblique);
lft z4r=(.5w,0)//; pos4(.25accent_depth,80-oblique);
rt z5r=lft z4r+(.5[accent_thin_end,accent_thick_end],0);
z3l=z4l; pos5(accent_depth,80-oblique);
rt z2r=(w,.5[y1l,y3r])//; pos2(accent_thick_end,0);
ref1=z2r{upward}...z3{left};
z20=ref1 intersectionpoint (z5r--z5l);
(t1,t2)=ref1 intersectiontimes (z5r--z5l);
p1=(subpath(0,t1)of ref1--z5r--z4r--z4l if softpath:)softjoin(z4l fi
--z3l{right}...z2l{downward}...z1r{left}
if softpath:)softjoin(z1r--z1l)softjoin( else:-- fi
z1l{right}...z2r{upward})--cycle;
showpoints(1,2,3,4,5);
draw (0,xheight)--(w,xheight);
adjust(0+m_a*b_mfit#,0+m_a*b_mfit#);
show_character; endchar;
iff OK "x": "The Double S Ligature or scharfes S";
beginchar(oct"031",b_w*width#+d_mono#,ascender#,0);
min_limit(join_radius)(.5*max(1,t